<?php
defined( '_JEXEC' ) or die( 'Restricted access' );


jimport('joomla.filesystem.folder');
global $dir,$mode,$auto,$files,$scroll,$speed,$width,$height,$sohinh,$direction;
$dir = $params->get('patch');

$mode = $params->get('mode','horizontal');
$auto = $params->get('auto',1);
$scroll=$params->get('scroll',1);

$speed= $params->get('speed',1);
$width= $params->get('width',100);
$height= $params->get('height',100);
$sohinh= $params->get('sohinh',2);

$direction= $params->get('direction','next');
$direction="'".$direction."'";
if(!JFolder::exists($dir))
{
	echo "Folder cannot found!";
	return;
}
$files=JFolder::files($dir,'.',false,false);

if(!$files)
{
	echo "Folder cannot image!";
	return;
}
?>

<link rel="stylesheet" type="text/css" href="<?php echo JURI::base(); ?>modules/mod_slideshow/skins/tango/skin.css" />
<link rel="stylesheet" type="text/css" href="<?php echo JURI::base(); ?>modules/mod_slideshow/lib/jquery.jcarousel.css"/>

<script type="text/javascript" src="<?php echo JURI::base(); ?>modules/mod_slideshow/lib/jquery-1.2.3.pack.js"></script>
<script type="text/javascript" src="<?php echo JURI::base(); ?>modules/mod_slideshow/lib/jquery.jcarousel.js"></script>

<link rel="stylesheet" type="text/css" href="<?php echo JURI::base(); ?>modules/mod_slideshow/lib/thickbox/thickbox.css"/>
<script type="text/javascript" src="<?php echo JURI::base(); ?>modules/mod_slideshow/lib/thickbox/thickbox.js"></script>

<?php 	
require(JModuleHelper::getLayoutPath('mod_slideshow'));
?>